/* 
 * File:   CameraAlceu.h
 * Author: gilvolpe
 *
 * Created on June 4, 2013, 3:19 PM
 */

#ifndef CAMERAALCEU_H
#define	CAMERAALCEU_H

#include "basicInformation.h"

#define INITIAL_POS_X 0.0
#define INITIAL_POS_Y = 0.0
#define INITIAL_POS_Z = -5.0

#define MOVE_STEP 10000.0

class Camera {
public:
    Camera(GLdouble posX, GLdouble posY, GLdouble posZ,
            GLdouble lookX, GLdouble lookY, GLdouble lookZ);

    void moveFront(GLdouble dist);
    void strafe(GLdouble dist);
    void cameraVision();
    
    /**
     * @param inclination Controla o olhar para cima e para baixo.
     * @param azimuth controla o olhar para esquerda e para direita.
     */
    void rotateCamera(GLdouble inclination, GLdouble azimuth);
    void updateLook(GLdouble distFromCenterX, GLdouble distFromCenterY);

    void controlOfTranslation(int key, int x, int y);
    
    
    GLdouble GetCenterX() const {
        return centerX;
    }

    void SetCenterX(GLdouble centerX) {
        this->centerX = centerX;
    }

    GLdouble GetCenterY() const {
        return centerY;
    }

    void SetCenterY(GLdouble centerY) {
        this->centerY = centerY;
    }

    GLdouble GetCenterZ() const {
        return centerZ;
    }

    void SetCenterZ(GLdouble centerZ) {
        this->centerZ = centerZ;
    }

    GLdouble GetFustrumFarPlane() const {
        return fustrumFarPlane;
    }

    void SetFustrumFarPlane(GLdouble fustrumFarPlane) {
        this->fustrumFarPlane = fustrumFarPlane;
    }

    GLdouble GetFustrumNearPlane() const {
        return fustrumNearPlane;
    }

    void SetFustrumNearPlane(GLdouble fustrumNearPlane) {
        this->fustrumNearPlane = fustrumNearPlane;
    }

    GLdouble GetMouseSensitivityX() const {
        return mouseSensitivityX;
    }

    void SetMouseSensitivityX(GLdouble mouseSensitivityX) {
        this->mouseSensitivityX = mouseSensitivityX;
    }

    GLdouble GetMouseSensitivityY() const {
        return mouseSensitivityY;
    }

    void SetMouseSensitivityY(GLdouble mouseSensitivityY) {
        this->mouseSensitivityY = mouseSensitivityY;
    }

    GLdouble GetPosX() const {
        return posX;
    }

    void SetPosX(GLdouble posX) {
        this->posX = posX;
    }

    GLdouble GetPosY() const {
        return posY;
    }

    void SetPosY(GLdouble posY) {
        this->posY = posY;
    }

    GLdouble GetPosZ() const {
        return posZ;
    }

    void SetPosZ(GLdouble posZ) {
        this->posZ = posZ;
    }

    bool isOrthogonal() const {
        return orthogonal;
    }

    void setOrthogonal(bool orthogonal) {
        this->orthogonal = orthogonal;
    }

private:
    GLdouble posX;
    GLdouble posY;
    GLdouble posZ;

    GLdouble centerX;
    GLdouble centerY;
    GLdouble centerZ;

    GLdouble fustrumNearPlane;
    GLdouble fustrumFarPlane;

    GLdouble mouseSensitivityY;
    GLdouble mouseSensitivityX;
    
    bool orthogonal;
};

#endif	/* CAMERAALCEU_H */

